<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Product_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product_name" readonly class="form-control" name="row[product_name]" type="text" value="{$row.product_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Product_specification')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product_specification" readonly class="form-control" name="row[product_specification]" type="text" value="{$row.product_specification|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Product_function')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-product_function" disabled readonly class="form-control " rows="5" name="row[product_function]" cols="50">{$row.product_function|htmlentities}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Product_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-product_image" class="form-control" size="50" type="hidden" value="{$row.product_image_str|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-product_image" class="btn btn-danger faupload" data-input-id="c-product_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-product_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-product_image" class="btn btn-primary fachoose" data-input-id="c-product_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-product_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-product_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Quantification_method')}:</label>
        <div class="col-xs-12 col-sm-8">
            {if $row.quantification_method == 1}
            <input id="c-quantification_method" readonly class="form-control" type="text" value="ISO 14067:2018 温室气体 产品碳足迹 量化要求和指南">
            {else /}
            <input id="c-quantification_method" readonly class="form-control" type="text" value="产品碳足迹量化要求和指南 电动自行车 电动摩托车">
            {/if}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Factor_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-factor_id" readonly class="form-control" type="text" value="{$row.factor_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" readonly  class="form-control" type="text" value="{$row.user_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {if $row.status == 0}
            {:build_radios('row[status]', ['0'=>'待审', '1'=>'已通过', '2'=>'驳回'], $row['status'])}
            {elseif condition="$row.status eq 2"/}
            <input class="form-control" name="row[status]" type="hidden" value="{$row.status|htmlentities}">
            <input id="c-status" readonly  class="form-control"  type="text" value="已驳回">
            {else /}
            <input class="form-control" name="row[status]" type="hidden" value="{$row.status|htmlentities}">
            <input id="c-status" readonly  class="form-control"  type="text" value="已通过">
            {/if}
        </div>
    </div>
    <div class="form-group" data-favisible="status=1">
        <label class="control-label col-xs-12 col-sm-2">{:__('Certification_body')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[certification_body]', $bodyName, null, ['class'=>'form-control selectpicker' ,'data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group" data-favisible="status=2">
        <label class="control-label col-xs-12 col-sm-2">{:__('Reason')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-reason"  class="form-control" {if $row.status} readonly {else /}  data-rule="required"  {/if} name="row[reason]" type="text" value="{$row.reason|htmlentities}">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            {if $row.status == 0}
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>

            {else/}
            <button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">{:__('Close')}</button>

            {/if}
        </div>
    </div>
</form>
